<?php

require_once(sfConfig::get('sf_lib_dir').'/filter/base/BaseFormFilterPropel.class.php');

/**
 * LevelI18n filter form base class.
 *
 * @package    elearning
 * @subpackage filter
 * @author     Your name here
 */
class BaseLevelI18nFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'level_name'          => new sfWidgetFormFilterInput(),
      'level_description'   => new sfWidgetFormFilterInput(),
      'vocabulary'          => new sfWidgetFormFilterInput(),
      'fluence'             => new sfWidgetFormFilterInput(),
      'grammar'             => new sfWidgetFormFilterInput(),
      'target_population'   => new sfWidgetFormFilterInput(),
      'structure_and_goals' => new sfWidgetFormFilterInput(),
      'result_at_complete'  => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'level_name'          => new sfValidatorPass(array('required' => false)),
      'level_description'   => new sfValidatorPass(array('required' => false)),
      'vocabulary'          => new sfValidatorPass(array('required' => false)),
      'fluence'             => new sfValidatorPass(array('required' => false)),
      'grammar'             => new sfValidatorPass(array('required' => false)),
      'target_population'   => new sfValidatorPass(array('required' => false)),
      'structure_and_goals' => new sfValidatorPass(array('required' => false)),
      'result_at_complete'  => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('level_i18n_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'LevelI18n';
  }

  public function getFields()
  {
    return array(
      'id'                  => 'ForeignKey',
      'culture'             => 'Text',
      'level_name'          => 'Text',
      'level_description'   => 'Text',
      'vocabulary'          => 'Text',
      'fluence'             => 'Text',
      'grammar'             => 'Text',
      'target_population'   => 'Text',
      'structure_and_goals' => 'Text',
      'result_at_complete'  => 'Text',
    );
  }
}
